package com.hxz.admin.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hxz.admin.service.AdminPublishService;
import com.hxz.entity.Article;
/**
 * 文章发布页面
 * @author hxz
 * @description TODO
 * @data 2019年12月5日 上午9:32:10
 */
@RequestMapping("/admin/article")
@Controller
public class AdminPublishController {
	@Autowired
	private AdminPublishService adminPublishService;
	
	@RequestMapping("/publish")
	public String  publishIndex(HttpServletRequest request) {
		List<Article> categories=adminPublishService.getCategoryList();
		request.setAttribute("categories", categories);
		
		return "admin/write";
	}
}
